﻿using DevExpress.ExpressApp.DC;
using DevExpress.Xpo;
using System;

namespace XafListViewDefaultNoLoadData.Module.BusinessObjects {

  [XafDisplayName("学生")]
  [DevExpress.Persistent.Base.DefaultClassOptions]
  public class TStudentBo : XPObject {
    public TStudentBo() : base() {
      // This constructor is used when an object is loaded from a persistent storage.
      // Do not place any code here.
    }

    public TStudentBo(Session session) : base(session) {
      // This constructor is used when an object is loaded from a persistent storage.
      // Do not place any code here.
    }

    public override void AfterConstruction() {
      base.AfterConstruction();
      // Place here your initialization code.
    }


    private int fAge;
    private string fName;

    [XafDisplayName("名称")]
    public string Name {
      get => fName;
      set => SetPropertyValue(nameof(Name), ref fName, value);
    }


    [XafDisplayName("年龄")]
    public int Age {
      get => fAge;
      set => SetPropertyValue(nameof(Age), ref fAge, value);
    }
  }
}